<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mdsproject/mds_logistictype/Mds_LogisticType.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mdsproject/mds_logistictype/Mds_LogisticType.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Mds_LogisticType",
        setup() {
            const table = ref({
                key: "LogisticTypeId",
                footer: "Foots",
                cnName: "物流任务类型",
                name: "mds_logistictype/Mds_LogisticType",
                newTabEdit: false,
                url: "/Mds_LogisticType/",
                sortName: "LogisticTypeId"
            });
            const editFormFields = ref({"LogisticType":"","LogisticTypeName":"","Enabled":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"MDS_LogisticType","data":[],"title":"物流任务类型","field":"LogisticType","type":"select"},
                               {"title":"物流任务类型名称","field":"LogisticTypeName"},
                               {"dataKey":"enabled","data":[],"title":"启用","field":"Enabled","type":"switch"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"LogisticType":"","LogisticTypeName":""});
            const searchFormOptions = ref([[{"dataKey":"","data":[],"title":"物流任务类型","field":"LogisticType","type":"select"},{"title":"物流任务类型名称","field":"LogisticTypeName","type":"like"}]]);
            const columns = ref([{field:"LogisticTypeId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticTypeEnumTxt",title:"任务类型",type:"string",width:90,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticType",title:"物流任务类型",type:"int",bind:{ key:"MDS_LogisticType",data:[]},width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticTypeName",title:"物流任务类型名称",type:"string",link:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"启用",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref(  {
                    cnName: "配置路线",
                    table: "Mds_LogisticTypeDetail",
                    columns: [{field:"LogisticTypeDetailId",title:"物流路线明细Id",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticTypeId",title:"ID",type:"bigint",width:110,hidden:true,edit:{type:""},require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Seq",title:"顺序",type:"int",width:80,edit:{type:"number"},require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LogisticLineId",title:"物流路线",type:"bigint",bind:{ key:"MDS_LogisticLine",data:[]},width:240,edit:{type:"select"},require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"启用",type:"sbyte",bind:{ key:"enabled",data:[]},width:80,edit:{type:"switch"},showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:160,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:160,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,hidden:true,edit:{type:"textarea"},showOverflowTooltip:true,align:"left"}],
                    sortName: "LogisticTypeDetailId",
                    key: "LogisticTypeDetailId"
                                            });
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
